﻿using System;

public class FirstBiggerMemberThanNeighbours
{
    public static decimal[] array;

    public static void Main()
    {
        array = Common.InputArray(array, "");
        Console.WriteLine("\nThe index of the first element in array that is bigger than its neighbors is {0}\n", 
            IndexOfFirst(array));
    }

    public static int IndexOfFirst(decimal[] array)
    {
        for (int position = 0; position < array.Length; position++)
            if (MemberAndNeighbours.Check(position, array) == 1)
                return position;

        return -1;
    }
}